From: Sundeep Mediratta Date: Sun, 23 Jun 2024 14:12:51 +0000 (-0400) Subject: workspace: Initialize overview windows correctly in constructor X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~226^2^2~58 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8af8a27d9180385874236a9eb0c38727845d46a7;p=gnome-shell.git workspace: Initialize overview windows correctly in constructor Currently overview windows added in workspace constructor lack monitoring the skip-taskbar property. All other windows added after this have this monitoring. This uses existing code to correctly add the signal and removes all redundant code. It also insures all transients are handled correctly on initialization using the existing code. Part-of: --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 4787cdf0e..147b843de 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1089,16 +1089,11 @@ class Workspace extends St.Widget { this.connect('destroy', this._onDestroy.bind(this)); this._skipTaskbarSignals = new Map(); - const windows = global.get_window_actors().map(a => a.meta_window) - .filter(this._isMyWindow, this); - - // Create clones for windows that should be - // visible in the Overview this._windows = []; - for (let i = 0; i < windows.length; i++) { - if (this._isOverviewWindow(windows[i])) - this._addWindowClone(windows[i]); - } + this._layoutFrozenId = 0; + + // DND requires this to be set + this._delegate = this; // Track window changes, but let the window tracker process them first this.metaWorkspace?.connectObject( @@ -1109,10 +1104,10 @@ class Workspace extends St.Widget { 'window-entered-monitor', this._windowEnteredMonitor.bind(this), GObject.ConnectFlags.AFTER, 'window-left-monitor', this._windowLeftMonitor.bind(this), GObject.ConnectFlags.AFTER, this); - this._layoutFrozenId = 0; - // DND requires this to be set - this._delegate = this; + // Create clones for windows that should be + // visible in the Overview + global.get_window_actors().map(a => this._doAddWindow(a.meta_window)); } _shouldLeaveOverview() {